Classification of Design Patterns
Get briefly introduced to the following types of design patterns: creational, structural, and behavioral design patterns.
The illustration below demonstrates some of the popular design patterns:
Creational design patterns#
These patterns are used to provide a mechanism for creating objects in a specific situation without revealing the creation method. The normal approach for creating an object might lead to complexities in the design of a project. These patterns allow flexibility in deciding which objects need to be created for a specific use case by providing control over the creation process.
Structural design patterns#
These patterns are concerned with class/object composition and relationships between objects. They let us add new functionalities to objects so that restructuring some parts of the system does not affect the rest. Hence, when some parts of the structure change, the entire system does not need to change.
Behavioral design patterns#
These patterns are concerned with communication between dissimilar objects in a system. They streamline communication and ensure that the information is synchronized between such objects.
Architectural design patterns#
These patterns are used for solving architectural problems within a given context in software architecture.
As discussed above, design patterns play a major role in the structuring of an application and are of great use to a developer. In the next few lessons, we will discuss the most common design patterns so that you can confidently answer any questions related to them in an interview and be able to implement them at your job.
Introduction to the Design Patterns
Creational Design Patterns